Ext.QuickTips.init();
var toolbar = Ext.create('Ext.toolbar.Toolbar', {
	region : 'north',
	split : false,
	border : false,
	items : [ {
		text : '重载配置',
		scale : 'medium',
		listeners : {
			click : function() {
				myform.load({
					url:'/codemaker/loadConfig.json'
				});
				grid.store.reload();
				enumsGrid.store.reload();
			}
		}
	}, {
		text : '保存配置',
		scale : 'medium',
		listeners : {
			click : function() {
				if (myform.isValid()) {
					myform.submit({
	            		url:'/codemaker/updateConfig.json',
	            		waitTitle:'提交',
	            		waitMsg:'数据提交中请稍候...',
	                    success: function(form, action) {
	                    	 Ext.MessageBox.show({
						           title: '返回结果',
						           msg: action.result.msg,
						           buttons: Ext.MessageBox.OK,
						           icon: Ext.MessageBox.INFO
						       });
	                    },
	                    failure: function(form, action) {
	                        Ext.MessageBox.show({
					           title: '错误',
					           msg: action.result.errorMessage,
					           buttons: Ext.MessageBox.OK,
					           icon: Ext.MessageBox.ERROR
					       });
	                    }
	                });
	            }
			}
		}
	} ]
});